package com.edu.lawyermanager.dongao.service;

import com.edu.lawyermanager.dongao.entity.Lawyer;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 律师档案业务接口
 * @author wangxiping
 * @version 1.0
 */

public interface LawyerService {
    /**
     * 添加律师(创建律师档案)
     * @param lawyer 包含律师信息的对象
     * @return  创建成功返回1 失败返回0
     */
    public int addLawyer(Lawyer lawyer);

    /**
     * 查询所有的律师
     * @return 所有律师
     */
    public List<Lawyer> findLawyer();

    /**
     * 删除律师
     * @param lawyerid 律师编号
     * @return 删除成功返回1 否则返回0
     */
    public int removeLawyer(int lawyerid);

    /**
     * 按照编号去查询律师
     * @param lawyerid 律师编号
     * @return 查询得到的律师对象
     */
    public Lawyer findLawyerById(int lawyerid);

    /**
     *修改律师
     * @param lawyer 律师对象
     * @return 修改成功返回1 否则返回0
     */
    public int modifyLawyer(Lawyer lawyer);
}
